package com.yueqian.xiangqi;

import javax.swing.*;

/**
 * @author shkstart
 * @create 2021-01-27 14:06
 */
public class MainView extends JFrame {
    private Painter painter;
    //工具栏
    private JToolBar jtb;
    //工具栏按钮
    private JToggleButton colorBuns[];
    private JToggleButton shapeBuns[];
    private JToggleButton operBuns[];
    //状态栏
    private JLabel typelab;

    public MainView() {
        super("Painter");
        this.setLocationRelativeTo(null);

        //添加组件
//        add();

        this.setVisible(true);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    /*
     * 添加组件
     *
     * */
    private void addComponent() {
        //添加工具栏
        addToolBar();
    }

    /*
     * 添加工具栏
     *
     * */
    private void addToolBar() {
        //构造工具栏
        jtb = new JToolBar();
//        this.add(jtb,NORTH);
//        //相撞按钮
//        String shapeBtnTexts[]={"线",}
    }

}
